-
Notifications
You must be signed in to change notification settings - Fork 0
LangGraph migration #109
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LangGraph migration #109
Conversation
## Summary Preview link: https://langchain-5e9cc07a-preview-brodyd-1754925111-e44a21e.mintlify.app/oss/python/overview This PR does two main things: 1. It reworks the `builder.py` file to generate JS and Python versions of the docs. 2. It adds CSS and JS files for conditionally hiding the language picker. The requirements for the picker are: - Show the picker when viewing the LangGraph docs - Hide the picker when viewing the LangGraph Platform or LangChain Labs docs ## Review requests + info We're doing custom things on top of Mintlify's stuff. It would be great if someone can help verify the changes to the `builder.py` file are acceptable, and although it's not the most elegant solution, that the CSS and JS files are an acceptable though likely temporary solution. I tried to update and fix tests appropriately but I really need someone to validate those changes are good. I haven't fixed/updated unit tests like this before. ## Todos - [x] Get this PR reviewed and implement any feedback - [x] Fix tests - [ ] Merge with #109 - [ ] 🎉 --------- Co-authored-by: Lauren Hirata Singh <[email protected]>
if url.startswith("/oss/"): | ||
parts = url.split("/") | ||
# Insert full language name after "oss" | ||
parts.insert(2, self.language_url_names[target_language]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this deducing the target language from the fenching? what if a link is outside of a fence?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Links work inside and outside of the fencing. I think we kind of pre-set the languages and just swap them out depending on which version of the docs we're building at the time.
pipeline/core/builder.py
Outdated
url = match.group(2) # The URL | ||
post = match.group(3) # Everything after the URL | ||
|
||
# Only rewrite absolute /oss/ paths |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed that this is also rewriting image paths, which it should ignore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for flagging this, pushing a fix now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.